package com.hxkj.client.service;

import com.hxkj.domain.po.Advertisement;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import com.platform.common.domain.result.ResultPageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
import java.util.Map;


/**
 * @author chenfangzhou
 * @create 2018年9月7日
 * @desc 广告管理-广告信息对外接口
 **/

@FeignClient(name = "cms-article")
public interface AdvertisementServiceClient {


    /**
     * 获取单条广告信息数据
     *
     * @param advertisement
     * @return 用户信息
     * @throws Exception
     */
    @RequestMapping(value = "/advertisement/get", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<Advertisement> get(@RequestBody Advertisement advertisement) throws Exception;

    /**
     * 新增广告信息
     *
     * @param advertisement 广告信息
     * @throws Exception
     */
    @RequestMapping(value = "/advertisement/save", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct save(@RequestBody Advertisement advertisement) throws Exception;


    /**
     * 修改广告信息
     *
     * @param advertisement 广告信息
     * @throws Exception
     */
    @RequestMapping(value = "/advertisement/modify", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct modify(@RequestBody Advertisement advertisement) throws Exception;

    /**
     * 删除广告信息(可删除多条)
     *
     * @param advertisement 广告信息
     * @throws Exception
     */
    @RequestMapping(value = "/advertisement/remove", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct remove(@RequestBody Advertisement advertisement) throws Exception;


    /**
     * 获取所有的广告列表,带分页
     *
     * @param parameterDataStruct 广告信息
     * @throws Exception
     */
    @RequestMapping(value = "/advertisement/getListWithPage", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultPageStruct<Advertisement> getListWithPage(@RequestBody ParameterDataStruct<Advertisement> parameterDataStruct) throws Exception;

    /**
     * 获取所有的广告列表,不带分页
     *
     * @param advertisement 广告信息
     * @throws Exception
     */
    @RequestMapping(value = "/advertisement/getList", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    List<Advertisement> getList(@RequestBody Advertisement advertisement) throws Exception;

    /**
     * @author chenfagnzhou
     * @Description modifySortNum 修改广告排序
     **/
    @RequestMapping(value = "/advertisementColumn/modifysortnum", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct modifySortNum(@RequestBody Map<String, Object> map) throws Exception;

}
